Skip to content

Feat/render math plugin - #399

Closed
Swiftb0y wants to merge 2 commits into
mixxxdj:websitefrom
Swiftb0y:feat/render-math-plugin
Closed

Feat/render math plugin#399
Swiftb0y wants to merge 2 commits into
mixxxdj:websitefrom
Swiftb0y:feat/render-math-plugin

Conversation

@Swiftb0y

@Swiftb0y Swiftb0y commented Jul 25, 2025

Copy link
Copy Markdown
Member

Since this will be useful for #398

Preview

@Swiftb0y

Swiftb0y commented Jul 25, 2025

Copy link
Copy Markdown
Member Author

Interesting, this renders locally but not deployed. Likely a CSP problem. I'll look into it.

@Swiftb0y
Swiftb0y force-pushed the feat/render-math-plugin branch 3 times, most recently from 163c10d to 724261a Compare July 25, 2025 15:35
@Swiftb0y

Copy link
Copy Markdown
Member Author

So actually deploying the plugin (or rather mathjax loading from an external CDN) forces me to do an amount of CSP hole punching I'm not comfortable with.

@Swiftb0y Swiftb0y closed this Jul 25, 2025
@Swiftb0y Swiftb0y reopened this Jul 25, 2025
@Swiftb0y
Swiftb0y force-pushed the feat/render-math-plugin branch 3 times, most recently from 6a221c8 to 7fa8c04 Compare July 25, 2025 16:19
@jclsn

jclsn commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

So what do we do? I think math is an essential feature. It makes the post much nicer and more readable.

@Eve00000

Eve00000 commented Jul 25, 2025

Copy link
Copy Markdown
Contributor

on https://viereck.ch/latex-to-svg/
you can convert your formula to a svg

If you set the color to #FFFFFF and download it you get something like this:
equation

(this is an svg uploaded in my comment)

@Swiftb0y
Swiftb0y force-pushed the feat/render-math-plugin branch from 7fa8c04 to b68424f Compare July 25, 2025 18:12
@Swiftb0y

Copy link
Copy Markdown
Member Author

I also favored the manual SVG approach until I remembered that inline math typesetting is also quite desirable to have (and not as easy to do with images). I wish there was a server side solution for this (as it would be the most elegant in this case), but there isn't afaict.

@Swiftb0y
Swiftb0y force-pushed the feat/render-math-plugin branch 2 times, most recently from 40ee3e2 to de3eca4 Compare July 25, 2025 18:40
@Swiftb0y

Copy link
Copy Markdown
Member Author

@jclsn this works now (apart from rendering equations in the summary text, but thats a known upstream issue I don't want to look into).

authors: Nikolaus Einhauser
status: draft
comments: yes
math: yes

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is important, any article that wants to use math needs to opt into it (because I don't want to load it on every single article that doesn't need it)

@Swiftb0y
Swiftb0y force-pushed the feat/render-math-plugin branch 7 times, most recently from 033d6bf to 0e99e52 Compare July 25, 2025 20:24
@Swiftb0y
Swiftb0y force-pushed the feat/render-math-plugin branch from 0e99e52 to 8e3e97b Compare July 25, 2025 20:27
@Swiftb0y
Swiftb0y force-pushed the feat/render-math-plugin branch from 0435171 to 03baaf2 Compare August 26, 2025 12:30
@Swiftb0y
Swiftb0y force-pushed the feat/render-math-plugin branch from 03baaf2 to 8e3e97b Compare August 26, 2025 12:31
@Swiftb0y

Copy link
Copy Markdown
Member Author

Merged through #398

@Swiftb0y Swiftb0y closed this Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants